package com.itchen.exception.code;

public enum BaseResponseCode implements ResponseCodeInterface{
    SUCCESS(200,"操作成功"),
    SYSTEM_ERROR(501,"系统异常请稍后再试"),
    VALIDATOR_ERROR(302,"参数校验异常"),
    FILE_NULL(500001,"文件为空"),
    DELETE_ERROR(500002,"删除数据异常"),
    DOWNLOAD_ERROR(410,"下载文件异常"),
    ID_ERROR(411,"id不存在"),
    FILE_ERROR(412,"文件不存在"),
    ;

    BaseResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 响应状态码
     */
    private final int code;

    /**
     * 响应提示
     * @return
     */
    private final String msg;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
